/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2022-04-29 13:38:45
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-05-23 14:51:02
 */
import request from '@/utils/request'

// 查询证书类型列表
export function listCertType(query) {
  return request({
    url: '/cert/certType/list',
    method: 'get',
    params: query
  })
}

export function allListCertType(query) {
  return request({
    url: '/cert/certType/allList',
    method: 'post',
    data: query
  })
}

export function treeselect(query) {
  return request({
    url: '/cert/certType/treeselect',
    method: 'get',
    params: query
  })
}

// 查询证书类型详细
export function getCertType(id) {
  return request({
    url: '/cert/certType/' + id,
    method: 'get'
  })
}

// 新增证书类型
export function addCertType(data) {
  return request({
    url: '/cert/certType',
    method: 'post',
    data: data
  })
}

// 修改证书类型
export function updateCertType(data) {
  return request({
    url: '/cert/certType',
    method: 'put',
    data: data
  })
}

// 删除证书类型
export function delCertType(id) {
  return request({
    url: '/cert/certType/' + id,
    method: 'delete'
  })
}

// 导出证书类型
export function exportCertType(query) {
  return request({
    url: '/cert/certType/export',
    method: 'get',
    params: query
  })
}
export function sortCertType(data) {
  return request({
    url: '/cert/certType/sort',
    method: 'put',
    data: data
  })
}

// 导入
export const importType = data => {
  return request({
    method: 'post',
    url: '/cert/certType/importType',
    data
  })
}
